f1 = open("ju")
f2 = open("predict.out")

s1 = []
s2 = []

for line in f1:
    s1.append(int(line.rstrip("\n")))
    
for line in f2:
    s2.append(int(line.rstrip("\n")))
    

total = 0
right = 0
for i in range(len(s1)):
    if s2[i] == 1:
        total = total + 1
        if s1[i] == 1:
            right = right + 1
            
print total, right, float(right) / total